#!/usr/bin/python
#coding=utf-8

#控制流
x=int(raw_input("please input  a number:"))

if (x<0):
    print '负数';
elif x==0:
    print '0';
elif x>0:
    print '正数'

words=["jack","mike","denial"];
for word in words:
    print word ,len(word);

for word in words[:]:
    if(len(word)>3):
        words.insert(0,word)  

print words
print range(10)
print range(1,5,2)
print range (-10,-100,-30)

for i in range(len(words)):
    print i,words[i]
for j in range(2,10):
    for b in range(2,j):
        if(j%b==0):
            print j,"=",b,"*",j/b;
            break;
    else:
        print j ,"is a 质数";





def initlog(*args):
    pass  #相当于TODO



#定义方法

def fib(n):
    """print a  fibonacci series up to n ."""
    a,b=0,1;
    while a<n:
        print a,
        a,b=b,a+b;
fib(100); 

def cheeseshop(kind,*arguments,**keywords):
    print "--do you have any " ,kind,"?"
    print "--I am sorry ,we are out of ",kind
    for arg in arguments:
        print arg
    print "--"*20
    keys=sorted(keywords.keys())
    for ky in keys:
        print ky,":",keywords[ky]
cheeseshop("limburger","it is very runny,sir","it is very ,very runny,sir",shopkeeper="mike",client="jhon",sketch="cheese shop sketch")

args=[3,6]
print range(*args)# *可以用来分开list或者是元祖来传参 **可以用来分开字典传参。
